-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Jib Ownership Maven Extension #1
Conversation
...java/com/google/cloud/tools/jib/plugins/extension/maven/ownership/JibOwnershipExtension.java
Show resolved
Hide resolved
can we change the PR description to describe the ownership extension? |
...rc/main/java/com/google/cloud/tools/jib/plugins/extension/maven/ownership/Configuration.java
Show resolved
Hide resolved
return buildPlan.toBuilder().setLayers(newLayers).build(); | ||
} | ||
|
||
private FileEntriesLayer modifyLayer(FileEntriesLayer layer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think modify technically isn't the process happening here? We're creating a new layer with changed values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the names to applyRulesToLayer/FileEntry
. That said, I changed Configuration.Entry
to Configuration.Rule
. The latter sounds better.
Updated the description. Worth checking. I'll take care of the code comments next week. |
Towards GoogleContainerTools/jib#1257 and GoogleContainerTools/jib#1955, as well as a workaround for GoogleContainerTools/jib#1270.
The Jib Maven extension allows the user to customize file ownership in layers.
The following example sets UID 300 and GID 500 for
/app/classes/**
.However, due to the way Jib adding parent directory tarball entries, the directories
/app
and/app/classes
will continue to have the ownership0:0
(root:root
). Considering the use-case of Skaffold, we should verify if this can cover the use-case; otherwise, we may need to revisit GoogleContainerTools/jib#1270.